/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;

/**
 * 订单管理Entity
 *
 * @author rongjie
 * @version 2017-08-06
 */
public class WxOrder extends DataEntity<WxOrder> {

	private static final long serialVersionUID = 1L;
	private WxUser user; // 用户id
	private String orderNumber; // 订单号
	private String wxNumber; // 微信订单
	private String status; // 状态 1,：未开始，4：已结束（过期）
	private String equipmentMoney; // 状态
	private String type; // 支付类型
	private String address; // 地址
	private String commenStatus; // 是否评论
	private YjEquipment equipment; // 设备号
	private String equipmentNumber; // 设备号
	private Date endTime; // 结束时间
	private Date time; // 结束时间
	private String abnormalCode; // 异常code
	private String orderTime; // 异常code
	private WxAgents agents; // 所属的代理商
	private String abnormalMsg; // 异常原因
	private String abnormalText; // 异常返回json
	private String orderMoney; // 异常返回json
	private String addOrderMoney; // 异常返回json
	private String text; // 异常返回json
	private String title; // 开机方式
	// private String coupon; //代金券金额
	private long date; // 异常返回json

	public WxAgents getAgents() {
		return agents;
	}

	public void setAgents(WxAgents agents) {
		this.agents = agents;
	}

	public String getOrderMoney() {
		return orderMoney;
	}

	public void setOrderMoney(String orderMoney) {
		this.orderMoney = orderMoney;
	}

	public String getAddOrderMoney() {
		return addOrderMoney;
	}

	public void setAddOrderMoney(String addOrderMoney) {
		this.addOrderMoney = addOrderMoney;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public WxOrder() {
		super();
		this.setIdType(IDTYPE_AUTO);
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public WxOrder(String id) {
		super(id);
	}

	public String getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(String orderTime) {
		this.orderTime = orderTime;
	}

	@ExcelField(title = "用户id", align = 2, sort = 1)
	public WxUser getUser() {
		return user;
	}

	public void setUser(WxUser user) {
		this.user = user;
	}

	@ExcelField(title = "订单号", align = 2, sort = 2)
	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	@ExcelField(title = "微信订单", align = 2, sort = 3)
	public String getWxNumber() {
		return wxNumber;
	}

	public void setWxNumber(String wxNumber) {
		this.wxNumber = wxNumber;
	}

	@ExcelField(title = "状态", dictType = "order_status", align = 2, sort = 4)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@ExcelField(title = "支付类型", dictType = "yes_no", align = 2, sort = 5)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@ExcelField(title = "地址", align = 2, sort = 6)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@ExcelField(title = "是否评论", dictType = "yes_no", align = 2, sort = 7)
	public String getCommenStatus() {
		return commenStatus;
	}

	public void setCommenStatus(String commenStatus) {
		this.commenStatus = commenStatus;
	}

	@NotNull(message = "设备号不能为空")
	@ExcelField(title = "设备号", align = 2, sort = 8)
	public YjEquipment getEquipment() {
		return equipment;
	}

	public void setEquipment(YjEquipment equipment) {
		this.equipment = equipment;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title = "结束时间", align = 2, sort = 9)
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@ExcelField(title = "异常code", align = 2, sort = 12)
	public String getAbnormalCode() {
		return abnormalCode;
	}

	public void setAbnormalCode(String abnormalCode) {
		this.abnormalCode = abnormalCode;
	}

	@ExcelField(title = "异常原因", align = 2, sort = 13)
	public String getAbnormalMsg() {
		return abnormalMsg;
	}

	public void setAbnormalMsg(String abnormalMsg) {
		this.abnormalMsg = abnormalMsg;
	}

	@ExcelField(title = "异常返回json", align = 2, sort = 14)
	public String getAbnormalText() {
		return abnormalText;
	}

	public void setAbnormalText(String abnormalText) {
		this.abnormalText = abnormalText;
	}

	public String getEquipmentMoney() {
		return equipmentMoney;
	}

	public void setEquipmentMoney(String equipmentMoney) {
		this.equipmentMoney = equipmentMoney;
	}

	public long getDate() {
		return date;
	}

	public void setDate(long date) {
		this.date = date;
	}

	public String getEquipmentNumber() {
		return equipmentNumber;
	}

	public void setEquipmentNumber(String equipmentNumber) {
		this.equipmentNumber = equipmentNumber;
	}
}
